			    	  Asteroid Storm OXP - V3.50
			        -----------------------------

			(New Asteroid Models and Textures by "Charlie")
			         (Scripting by "LittleBear")
			    (Further scripting for 3.4+  by "Kaks")
				   (Original JS script by "Dajt")
			     (Galatic Police Image by "Wombat")

UPDATE : A role key is added to all asteroids added by this OXP. In the previous version only the Large Asteroids had a role.
This meant that only these appeared in game (oops)! On the old version, only 1 new type of asteroid was added even though the
OXP has the graphics and models to add 12 different types. The new versions now works as intended and you will see a greater
variety to the shapes and sizes of all asteroids in the Ooniverse. Only the graphics are changed, rocks are still rocks!

With this version all of Charlies asteroids now appear, rather than just one of them.


------------------------------------------------------------------------------------------------

An addon for Oolite by Giles Williams.

Based on "Elite" by Ian Bell and David Braben.

Version 3.50 - compatible with Oolite 1.71 and above. 


-------------------------------------------------------------------------------------------------

Overview
--------

This OXP adds more models and textures for Asteroids to the game. All the new asteroids were
modeled and textured by "Charlie", based upon asteroids in the Real Life Sol System. Some are
really big and will be marked by your ID computer as a "Large Asteroid"!

In the native game there are only two types of asteroid. If you play with this OXP installed then
there is more varitety to the shapes and sizes of the asteroids you encounter as they have 15
different shapes and sizes. The chance and number of boulders formed when an asteroid is
destroyed also varies for each type of asteroid.

The OXP also adds an asteroid related mission, well suited to a novice commander in Galaxy 1.

You are docked at a station near Lave, in a system well known to suffer from asteroid storms.
Sure enough, as you drop off your cargo, you hear the sound of small asteroids glancing off
the Station's shields. Suddenly all hell breaks loose, Commanders running for their ships,
leaving their cargo behind!

A Large Asteroid has been detected approaching the Station. It is so massive that if it strikes,
destruction of the mighty Dodec is certain. Will you stay and help or get out of Dodge?

The mission has three possible endings depending on your actions.

The mission will trigger when you are docked at a certain system within 7 light years of Lave
and are ranked at least "Above Average". I won't tell you the name of the system, but you may
find that checking your F7 screen gives a clue!

This is intended to be a faily easy mission, but a bit of fun!

Updates from V1.0
-----------------

1) Version 2.0 adds the models and textures for Charlie's asteroids to the game generally.

2) A code optimisation to remove the System's station permenatley, if it is destroyed.
   (The station is now removed by setting the System's station to "none".)

Updates from V2.0
-----------------

1) Texture case names fixed. No problem on Windows or Mac, but the old version had case
sensitivitey bugs, which caused a problem on Unix.

2) Eric's mission clash prevention code added, to ensure this OXP doesn't clash with any other
OXPs that display mission briefing screens.

3) The "Large Asteroids" added to the Universe generally have a higher energy value, making
them more resiliant to laser fire than a small asteroid.

4) The system which "suffers from deadly asteroid storms" now has a higher than average number of
asteroids in the space lanes, and a small (non-dangerous) storm occours near the station whenever
the system is visited. Displaced asteroids can also be seen whizzing through the spacelanes.

v.3.45
------
- Cleanup script bugfixed, large asteroids labelled properly.

v.3.46
------

A role key is added to all asteroids added by this OXP. In the previous version only the Large Asteroids had a role. This
meant that only these appeared in game (oops)! On the old version, only 1 new type of asteroid was added even though the
OXP has the graphics and models to add 12 different types. The new versions now works as intended and you will see a greater
variety to the shapes and sizes of all asteroids in the Ooniverse. Only the graphics are changed, rocks are still rocks!

v.3.50
------
Because of the large scripting changes since Oolite 1.70, some of the special stuff to make it work with 1.70 is removed again and instead code is added to make it work with 1.71+. (1.72.0 has a bug but will generate a warning on screen. You need than to update to at least 1.72.1)
All normal big asteroids now have a script that let them generate additional boulders throughout the asteroid and not just in the centre. 

Updates from v.3.0
------------------ 

1) 	Legacy script: reduced number of tests done by the script to 3, improving overall system performance.

2) 	Made the mission slightly tougher.

3) 	Added alternative mission ending: in some cases, the station will be partially hit by the asteroid, with irreversible damage to the station's main reactor.

4) 	Further cleanup of asteroids, including solving more upper/lower case problems with linux & case sensitive macs.

5) 	In case of cowardice, legal status now worsens by 25 points, as opposed to being set at 25.

6) 	1.68 and 1.69: message screen - after loading savegame - explaining how to enable the 1.65 version on their computer.

7) 	1.70: If the player score is 50% higher than the minimum required for the mission, the asteroid will be tougher still.

8) 	1.70: If the main station is destroyed, stations added by other OXPs will also be removed from the system.

9) 	1.70: Workaround for 'indestructible stations', With nice station explosion, 30-60 seconds after partial asteroid hit.

10)	1.70: Once mission finishes, run only 1 event handler, improving overall system performance.

11)	1.70: Mission records who destroyed the asteroid, and gives a smaller reward to player if NPCs did it.

12)	1.70: If the player had an energy bomb before the mission and can get back to the station, they get their bomb back.

13)	1.71: The further the asteroid is from the station, the more hits will be needed to destroy it.


Switching between 1.65 and 1.71+ modes
--------------------------------------

This OXP will run without modifications with Oolite v1.65 and v1.71 and up. To run this OXP in any of the versions in between, you need to disable the javascript part of this OXP:

Open AsteroidStorm.oxp, and inside the Config folder, change 'world-scripts.plist' to '~world-scripts.plist'.
Once you restart Oolite, the OXP will work, using the 1.65 code.

To re-enable javascript and the 1.71 features, change the file name back from ~world-scripts.plist to world-scripts.plist'.



Known Performance Issues (for old systems like mine!)
----------------------------------------------------

When you launch into the Storm during the mission, Oolite will freeze for a few seconds whilst
it adds all the Asteroids to the Ooniverse. Once the Asteroids are added, the game runs normally.

If the Station is destroyed, Oolite will freeze for a few seconds whilst it adds all the
wreackage that the destroyed station throws out!


LittleBear.
